package cntr.memoryspace;


import cntr.proxies.SourceRoleProxy;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Thanh-Trung Pham.
 */
public class ComponentInstanceMemoryObject extends MemoryObject{

    private Map<String, SourceRoleProxy> m_oSourceRoleProxies = new HashMap<>(); //mapping between a source role name and its SourceRoleProxy

    public ComponentInstanceMemoryObject(String name, Object value) {
        super(name, value);
    }

    public SourceRoleProxy getSourceRoleProxy(String sourceRoleName){
        return m_oSourceRoleProxies.get(sourceRoleName);
    }

    public void putSourceRoleProxy(String sourceRoleName, SourceRoleProxy sourceRoleProxy){
        m_oSourceRoleProxies.put(sourceRoleName, sourceRoleProxy);

    }

}
